package com.quanyan.stadium.service.commonComponent.impl;

import com.google.common.collect.Lists;
import com.quanyan.messagepush.enums.IdType;
import com.quanyan.messagepush.enums.MsgType;
import com.quanyan.stadium.api.req.ReqRecordGameScheduleResult;
import com.quanyan.stadium.biz.BizGameSystemDao;
import com.quanyan.stadium.component.pushMsg.MsgPush;
import com.quanyan.stadium.component.pushMsg.StadiumMsgModel;
import com.quanyan.stadium.constants.GameConstants;
import com.quanyan.stadium.entity.TbGameCommonParameter;
import com.quanyan.stadium.entity.TbGameEvent;
import com.quanyan.stadium.enums.GameSystemConfigEnum;
import com.quanyan.stadium.enums.GameTypeConfigEnum;
import com.quanyan.stadium.service.commonComponent.BaseService;
import com.quanyan.stadium.service.commonComponent.ConfigService;
import com.quanyan.stadium.service.commonComponent.GameMsgPush;
import com.quanyan.stadium.service.commonComponent.OfficialGameCache;
import com.quanyan.stadium.utils.DateUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.*;

/**
 * @author xiaoxiao
 * @date 16/4/11-14:42
 * <p/>
 * 运动场,赛事相关的消息推送
 */

@Service("gameMsgPush")
public class GameMsgPushImpl implements GameMsgPush {

    private final static Logger logger = LoggerFactory.getLogger(GameMsgPushImpl.class);


    private final static int MAX_UID_LIST_SIZE = 50;

    @Autowired
    private BaseService baseService;

    @Autowired
    private MsgPush msgPush;

    @Autowired
    private ConfigService configService;

    @Autowired
    private BizGameSystemDao bizGameSystemDao;

    @Autowired
    private OfficialGameCache officialGameCache;

    @Override
    public void pushJoinOfficialGameEventAccessUser(TbGameEvent tbGameEvent, List<Integer> uids) {
        if (uids == null || uids.size() < 1) {
            return;
        }
        HashSet<Integer> tempSet = new HashSet<>(uids);
        uids = new ArrayList<>(tempSet);
        Map<String, Object> params = new HashMap();
        params.put("gameEventId", (long) tbGameEvent.getId());
        params.put("gameEventType", tbGameEvent.getGameEventType());
        params.put("categoryId", tbGameEvent.getCategoryId());
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_OFFICIAL_JOIN_QUALIFICATION_MSG);
        String body = MsgPush.msgUtils(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName());
        int n = uids.size() / MAX_UID_LIST_SIZE + 1;
        for (int i = 0; i < n; i++) {
            StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
            stadiumMsgModel.setMsgTitle(body);
            stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
            stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
            stadiumMsgModel.setMsgType(MsgType.JUMP_MSG);
            stadiumMsgModel.setIdType(getGameDetailByType(tbGameEvent.getGameEventType().intValue()));
            stadiumMsgModel.setParams(params);
            stadiumMsgModel.setToUidList(uids.subList(i * MAX_UID_LIST_SIZE, (i + 1) == n ? uids.size() : (i + 1) * MAX_UID_LIST_SIZE));
            msgPush.pushMessageOperate(stadiumMsgModel);
        }

        logger.info("官方赛事到了报名阶段,开始推送报名资格的用户,当前赛事:{}", tbGameEvent.getId());
    }

    @Override
    public void pushGeneraterCompListToUser(List<Integer> currentUids, TbGameEvent tbGameEvent) {
        if (currentUids == null || currentUids.size() < 1) {
            return;
        }
        Map<String, Object> params = new HashMap();
        params.put("gameEventId", (long) tbGameEvent.getId());
        params.put("gameEventType", tbGameEvent.getGameEventType());
        params.put("categoryId", tbGameEvent.getCategoryId());
        HashSet<Integer> tempSet = new HashSet<>(currentUids);
        currentUids = new ArrayList<>(tempSet);
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_OFFICIAL_SCHEDULE_LIST_GENERATE_MSG);
        String body = MsgPush.msgUtils(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName());
        int n = currentUids.size() / MAX_UID_LIST_SIZE + 1;
        for (int i = 0; i < n; i++) {
            StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
            stadiumMsgModel.setMsgTitle(body);
            stadiumMsgModel.setIdType(getGameDetailByType(tbGameEvent.getGameEventType().intValue()));
            stadiumMsgModel.setParams(params);
            stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
            stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
            stadiumMsgModel.setMsgType(MsgType.JUMP_MSG);
            stadiumMsgModel.setToUidList(currentUids.subList(i * MAX_UID_LIST_SIZE, (i + 1) == n ? currentUids.size() : (i + 1) * MAX_UID_LIST_SIZE));
            stadiumMsgModel.setToUrl(MsgPush.USER_GAME_SCHEDULE_URL);
            msgPush.pushMessageOperate(stadiumMsgModel);
        }

    }

    @Override
    public void pushGameRoundEndToUser(List<Integer> totalUids, TbGameEvent tbGameEvent) {
        if (totalUids == null || totalUids.size() < 1) {
            return;
        }
        Map<String, Object> params = new HashMap();
        params.put("gameEventId", (long) tbGameEvent.getId());
        params.put("gameEventType", tbGameEvent.getGameEventType());
        params.put("categoryId", tbGameEvent.getCategoryId());
        HashSet<Integer> tempSet = new HashSet<>(totalUids);
        totalUids = new ArrayList<>(tempSet);
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_OFFICIAL_SCHEDULE_END_MSG);
        String body = DateUtil.getSpecialDateStr() + MsgPush.msgUtilsReplaceXXX(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName());
        int n = totalUids.size() / MAX_UID_LIST_SIZE + 1;
        for (int i = 0; i < n; i++) {
            StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
            stadiumMsgModel.setMsgTitle(body);
            stadiumMsgModel.setIdType(getGameDetailByType(tbGameEvent.getGameEventType().intValue()));
            stadiumMsgModel.setParams(params);
            stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
            stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
            stadiumMsgModel.setMsgType(MsgType.JUMP_MSG);
            stadiumMsgModel.setToUidList(totalUids.subList(i * MAX_UID_LIST_SIZE, (i + 1) == n ? totalUids.size() : (i + 1) * MAX_UID_LIST_SIZE));
            msgPush.pushMessageOperate(stadiumMsgModel);
        }
    }

    @Override
    public void pushGameRoundEndToWinUser(List<Integer> winUids, TbGameEvent tbGameEvent) {
        if (winUids == null || winUids.size() < 1) {
            return;
        }
        Map<String, Object> params = new HashMap();
        params.put("gameEventId", (long) tbGameEvent.getId());
        params.put("gameEventType", tbGameEvent.getGameEventType());
        params.put("categoryId", tbGameEvent.getCategoryId());

        HashSet<Integer> tempSet = new HashSet<>(winUids);
        winUids = new ArrayList<>(tempSet);
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_OFFICIAL_SCHEDULE_USER_WIN_MSG);
        String body = tbGameCommonParameter.getParameterValue();
        int n = winUids.size() / MAX_UID_LIST_SIZE + 1;
        for (int i = 0; i < n; i++) {
            StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
            stadiumMsgModel.setMsgTitle(body);
            stadiumMsgModel.setIdType(getGameDetailByType(tbGameEvent.getGameEventType().intValue()));
            stadiumMsgModel.setParams(params);
            stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
            stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ": " + body);
            stadiumMsgModel.setMsgType(MsgType.JUMP_MSG);
            stadiumMsgModel.setToUidList(winUids.subList(i * MAX_UID_LIST_SIZE, (i + 1) == n ? winUids.size() : (i + 1) * MAX_UID_LIST_SIZE));
            stadiumMsgModel.setToUrl(MsgPush.USER_GAME_SCHEDULE_URL);
            msgPush.pushMessageOperate(stadiumMsgModel);
        }
    }

    @Override
    public void pushGameRoundEndToFailUser(List<Integer> failUids, TbGameEvent tbGameEvent) {
        if (failUids == null || failUids.size() < 1) {
            return;
        }
        Map<String, Object> params = new HashMap();
        params.put("gameEventId", (long) tbGameEvent.getId());
        params.put("gameEventType", tbGameEvent.getGameEventType());
        params.put("categoryId", tbGameEvent.getCategoryId());
        HashSet<Integer> tempSet = new HashSet<>(failUids);
        failUids = new ArrayList<>(tempSet);
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_OFFICIAL_SCHEDULE_USER_FAIL_MSG);
        String body = tbGameCommonParameter.getParameterValue();
        int n = failUids.size() / MAX_UID_LIST_SIZE + 1;
        for (int i = 0; i < n; i++) {
            StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
            stadiumMsgModel.setMsgTitle(body);
            stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
            stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
            stadiumMsgModel.setMsgType(MsgType.JUMP_MSG);
            stadiumMsgModel.setIdType(getGameDetailByType(tbGameEvent.getGameEventType().intValue()));
            stadiumMsgModel.setParams(params);
            stadiumMsgModel.setToUidList(failUids.subList(i * MAX_UID_LIST_SIZE, (i + 1) == n ? failUids.size() : (i + 1) * MAX_UID_LIST_SIZE));
            stadiumMsgModel.setToUrl(MsgPush.USER_GAME_SCHEDULE_URL);
            msgPush.pushMessageOperate(stadiumMsgModel);
        }
    }

    @Override
    public void pushGameFinishPushMsgToUser(TbGameEvent tbGameEvent, List<Integer> uIds) {
        if (uIds == null || uIds.size() < 1) {
            return;
        }
        HashSet<Integer> tempSet = new HashSet<>(uIds);
        uIds = new ArrayList<>(tempSet);
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_OFFICIAL_EVENT_EDN_MSG);
        String body = DateUtil.getSpecialDateStr() + MsgPush.msgUtilsReplaceXXX(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName());
        int n = uIds.size() / MAX_UID_LIST_SIZE + 1;
        Map<String, Object> params = new HashMap();
        params.put("gameEventId", (long) tbGameEvent.getId());
        params.put("gameEventType", tbGameEvent.getGameEventType());
        params.put("categoryId", tbGameEvent.getCategoryId());
        for (int i = 0; i < n; i++) {
            StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
            stadiumMsgModel.setMsgTitle(body);
            stadiumMsgModel.setParams(params);
            stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
            stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
            stadiumMsgModel.setMsgType(MsgType.JUMP_MSG);

            //由于业务调整，赛事类型增加，跳转链接由 方法getGameDetailByType 提供
//            if(tbGameEvent.getGameSystemType() == GameSystemConfigEnum.CONFIG_GAME_TYPE_PK.getId()) {
//                stadiumMsgModel.setIdType(IdType.STADIUM_GAME_PK_DETAIL);
//            }else{
//                stadiumMsgModel.setIdType(IdType.STADIUM_GAME_EVENT_DETAIL);
//            }
            stadiumMsgModel.setIdType(this.getGameDetailByType(tbGameEvent.getGameEventType()));
            stadiumMsgModel.setToUidList(uIds.subList(i * MAX_UID_LIST_SIZE, (i + 1) == n ? uIds.size() : (i + 1) * MAX_UID_LIST_SIZE));
            msgPush.pushMessageOperate(stadiumMsgModel);
        }
        logger.info("官方赛事完结,记录用户的赛事数目以及赛程数目,当前赛事:{}", tbGameEvent.getId());
    }

    @Override
    public void pushTeamTypePersonMsgToUserFirst(Integer uid, TbGameEvent tbGameEvent) {
        if (uid == null || uid < 1) {
            return;
        }
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_OFFICIAL_TEAM_PERSON_TOP1_MSG);
        StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
        String body = MsgPush.msgUtils(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName());
        stadiumMsgModel.setMsgTitle(body);
        stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
        stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
        stadiumMsgModel.setMsgType(MsgType.NOTIFY_MSG);
        stadiumMsgModel.setToUidList(baseService.queryMyClubIds(uid));
        msgPush.pushMessageOperate(stadiumMsgModel);

    }

    @Override
    public void pushTeamTypePersonMsgToUserSecond(Integer uid, TbGameEvent tbGameEvent) {
        if (uid == null || uid < 1) {
            return;
        }
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_OFFICIAL_TEAM_PERSON_TOP2_MSG);
        StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
        String body = MsgPush.msgUtils(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName());
        stadiumMsgModel.setMsgTitle(body);
        stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
        stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
        stadiumMsgModel.setMsgType(MsgType.NOTIFY_MSG);
        stadiumMsgModel.setToUidList(baseService.queryMyClubIds(uid));
        msgPush.pushMessageOperate(stadiumMsgModel);
    }

    @Override
    public void pushTeamTypeClubMsgToUserFirst(List<Integer> uids, TbGameEvent tbGameEvent) {
        if (uids == null || uids.size() < 1) {
            return;
        }
        HashSet<Integer> tempSet = new HashSet<>(uids);
        uids = new ArrayList<>(tempSet);
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_OFFICIAL_TEAM_CLUB_TOP1_MSG);
        String categoryName = "篮球";
        if (tbGameEvent.getCategoryId().intValue() == GameConstants.CATEGORY_ID_FOOTBALL) {
            categoryName = "足球";
        }
        String body = MsgPush.msgUtils(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName(), categoryName);
        int n = uids.size() / MAX_UID_LIST_SIZE + 1;
        for (int i = 0; i < n; i++) {
            StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
            stadiumMsgModel.setMsgTitle(body);
            stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
            stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
            stadiumMsgModel.setMsgType(MsgType.NOTIFY_MSG);
            stadiumMsgModel.setToUidList(uids.subList(i * MAX_UID_LIST_SIZE, (i + 1) == n ? uids.size() : (i + 1) * MAX_UID_LIST_SIZE));
            msgPush.pushMessageOperate(stadiumMsgModel);
        }
    }

    @Override
    public void pushTeamTypeClubMsgToUserSecond(List<Integer> uids, TbGameEvent tbGameEvent) {
        if (uids == null || uids.size() < 1) {
            return;
        }
        HashSet<Integer> tempSet = new HashSet<>(uids);
        uids = new ArrayList<>(tempSet);
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_OFFICIAL_TEAM_CLUB_TOP2_MSG);
        String categoryName = "篮球";
        if (tbGameEvent.getCategoryId().intValue() == GameConstants.CATEGORY_ID_FOOTBALL) {
            categoryName = "足球";
        }
        String body = MsgPush.msgUtils(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName(), categoryName);
        int n = uids.size() / MAX_UID_LIST_SIZE + 1;
        for (int i = 0; i < n; i++) {
            StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
            stadiumMsgModel.setMsgTitle(body);
            stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
            stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
            stadiumMsgModel.setMsgType(MsgType.NOTIFY_MSG);
            stadiumMsgModel.setToUidList(uids.subList(i * MAX_UID_LIST_SIZE, (i + 1) == n ? uids.size() : (i + 1) * MAX_UID_LIST_SIZE));
            msgPush.pushMessageOperate(stadiumMsgModel);
        }
    }

    @Override
    public void pushGameCancelMsgToUser(List<Integer> uids, TbGameEvent tbGameEvent) {
        if (uids == null || uids.size() < 1) {
            return;
        }
        HashSet<Integer> tempSet = new HashSet<>(uids);
        uids = new ArrayList<>(tempSet);
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_OFFICIAL_EVENT_CANCEL_MSG);
        String body = DateUtil.getSpecialDateStr() + MsgPush.msgUtilsReplaceFirstXXX(MsgPush.msgUtilsReplaceFirstXXX(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName()), tbGameEvent.getManagerName());
        int n = uids.size() / MAX_UID_LIST_SIZE + 1;
        for (int i = 0; i < n; i++) {
            StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
            stadiumMsgModel.setMsgTitle(body);
            stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
            stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
            stadiumMsgModel.setMsgType(MsgType.NOTIFY_MSG);
            stadiumMsgModel.setToUidList(uids.subList(i * MAX_UID_LIST_SIZE, (i + 1) == n ? uids.size() : (i + 1) * MAX_UID_LIST_SIZE));
            msgPush.pushMessageOperate(stadiumMsgModel);
        }
    }


    @Override
    public void pushRecordScoreDisputeMsgToUser(ReqRecordGameScheduleResult req, TbGameEvent tbGameEvent,List<Integer> uids,long time) {
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_OFFICIAL_RECORD_DISPUTE_MSG);
        StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
        int gameType = tbGameEvent.getGameEventType().intValue() ;
        if(gameType == GameTypeConfigEnum.CONFIG_GAME_EVENT_TYPE_PERSONAL.getId()) {
            stadiumMsgModel.setIdType(IdType.STADIUM_GAME_PK_SCORE);
        }else if (gameType  == GameTypeConfigEnum.CONFIG_GAME_EVENT_TYPE_SCENE.getId()){
            stadiumMsgModel.setIdType(IdType.STADIUM_GAME_EVENT_DETAIL);
        }else if (gameType  == GameTypeConfigEnum.CONFIG_GAME_EVENT_TYPE_INTERNAL.getId()){
            stadiumMsgModel.setIdType(IdType.STADIUM_GAME_EVENT_DETAIL);
        }else {
            stadiumMsgModel.setIdType(IdType.STADIUM_GAME_EVENT_DETAIL);
        }
        String body = DateUtil.getSpecialDateStr() + MsgPush.msgUtilsReplaceXXX(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName());
        stadiumMsgModel.setMsgTitle(body);
        stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
        stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
        stadiumMsgModel.setMsgType(MsgType.JUMP_MSG);
        Map<String, Object> params = new HashMap();
        params.put("gameEventId", (long) tbGameEvent.getId());
        params.put("time",time);
        stadiumMsgModel.setParams(params);
        stadiumMsgModel.setToUidList(uids);
        msgPush.pushMessageOperate(stadiumMsgModel);
        logger.info("录入比分存在争议,当前赛程ID:{}", req.getGameScheduleId());
    }

    @Override
    public void pushGameStartMsgToUser(TbGameEvent tbGameEvent, List<Integer> uids) {
        if (null == uids || uids.size() < 1) {
            return;
        }
        HashSet<Integer> tempSet = new HashSet<>(uids);
        uids = new ArrayList<>(tempSet);
        TbGameCommonParameter tbGameCommonParameter = null;
        if (tbGameEvent.getGameTeamType().intValue() == GameConstants.TEAM_TYPE_CLUB.intValue()) {
            tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                    MsgPush.GAME_OFFICIAL_TEAM_CLUB_START_MSG);
        } else {
            tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                    MsgPush.GAME_OFFICIAL_TEAM_PERSON_START_MSG);
        }
        String body = MsgPush.msgUtils(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName(),
                tbGameEvent.getManagerName() != null ? tbGameEvent.getManagerName() : configService.getProperty("pk.alert.title", "百灵鸟"));
        int n = uids.size() / MAX_UID_LIST_SIZE + 1;
        for (int i = 0; i < n; i++) {
            StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
            stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
            stadiumMsgModel.setMsgTitle(body);
            stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
            stadiumMsgModel.setMsgType(MsgType.NOTIFY_MSG);
            stadiumMsgModel.setToUidList(uids.subList(i * MAX_UID_LIST_SIZE, (i + 1) == n ? uids.size() : (i + 1) * MAX_UID_LIST_SIZE));
            msgPush.pushMessageOperate(stadiumMsgModel);
        }
        logger.info("赛事开始, 提醒用户参加,当前赛事:{}", tbGameEvent.getId());
    }

    @Override
    public void pushBeforeOneHourGameStartMsgToUser(TbGameEvent tbGameEvent, List<Integer> uids) {
        if (uids == null || uids.size() < 1) {
            return;
        }
        HashSet<Integer> tempSet = new HashSet<>(uids);
        uids = new ArrayList<>(tempSet);
        TbGameCommonParameter tbGameCommonParameter = null;
        if (tbGameEvent.getGameTeamType().intValue() == GameConstants.TEAM_TYPE_CLUB.intValue()) {
            tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                    MsgPush.GAME_OFFICIAL_TEAM_CLUB_SCHEDULE_ONE_HOUR_START_MSG);
        } else {
            tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                    MsgPush.GAME_OFFICIAL_TEAM_PERSON_SCHEDULE_ONE_HOUR_START_MSG);
        }
        Map<String, Object> params = new HashMap();
        params.put("gameEventId", (long) tbGameEvent.getId());
        params.put("gameEventType", tbGameEvent.getGameEventType());
        params.put("categoryId", tbGameEvent.getCategoryId());
        String body = DateUtil.getSpecialDateStr() + MsgPush.msgUtilsReplaceXXX(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName());
        int n = uids.size() / MAX_UID_LIST_SIZE + 1;
        for (int i = 0; i < n; i++) {
            StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
            stadiumMsgModel.setMsgTitle(body);
            stadiumMsgModel.setParams(params);
            stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
            stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
            stadiumMsgModel.setMsgType(MsgType.JUMP_MSG);
            stadiumMsgModel.setIdType(getGameDetailByType(tbGameEvent.getGameEventType().intValue()));
            stadiumMsgModel.setToUidList(uids.subList(i * MAX_UID_LIST_SIZE, (i + 1) == n ? uids.size() : (i + 1) * MAX_UID_LIST_SIZE));
            msgPush.pushMessageOperate(stadiumMsgModel);
        }
        logger.info("赛事开始前1小时, 提醒用户参加,当前赛事:{}", tbGameEvent.getId());
    }

    @Override
    public void gameExpireMsg(TbGameEvent tbGameEvent, List<Integer> uids, Boolean isExpired) {
        if (uids == null || uids.size() < 1) {
            return;
        }
        HashSet<Integer> tempSet = new HashSet<>(uids);
        uids = new ArrayList<>(tempSet);
        TbGameCommonParameter tbGameCommonParameter = null;
        if (!isExpired) {
            tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                    MsgPush.GAME_EXPIRE_TIME_MSG);
        } else {
            tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                    MsgPush.GAME_EXPIRED_TIME_MSG);
        }
        String body = DateUtil.getSpecialDateStr() + MsgPush.msgUtilsReplaceXXX(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName());
        int n = uids.size() / MAX_UID_LIST_SIZE + 1;
        for (int i = 0; i < n; i++) {
            StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
            stadiumMsgModel.setMsgTitle(body);
            stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
            stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
            stadiumMsgModel.setMsgType(MsgType.NOTIFY_MSG);
            stadiumMsgModel.setToUidList(uids.subList(i * MAX_UID_LIST_SIZE, (i + 1) == n ? uids.size() : (i + 1) * MAX_UID_LIST_SIZE));
            msgPush.pushMessageOperate(stadiumMsgModel);
        }
        logger.info("赛事快结束并将近逾期，提醒用户:{}", tbGameEvent.getId());
    }

    @Override
    public void inputScore(TbGameEvent tbGameEvent, List<Integer> uids,String inputerName,long time) {
        if (uids == null || uids.size() == 0) {
            return;
        }
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_INPUT_SCORE);
        String body = DateUtil.getSpecialDateStr() + MsgPush.msgUtilsReplaceFirstXXX(MsgPush.msgUtilsReplaceFirstXXX(tbGameCommonParameter.getParameterValue(), inputerName), tbGameEvent.getName());
        StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
        Map<String, Object> params = new HashMap();
        params.put("gameEventId", (long) tbGameEvent.getId());
        params.put("time",time);
        params.put("gameEventType", tbGameEvent.getGameEventType());
        params.put("categoryId", tbGameEvent.getCategoryId());
        stadiumMsgModel.setParams(params);
        stadiumMsgModel.setMsgTitle(body);
        stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
        stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
        stadiumMsgModel.setMsgType(MsgType.JUMP_MSG);
        stadiumMsgModel.setIdType(IdType.STADIUM_GAME_PK_SCORE);
        stadiumMsgModel.setToUidList(uids);
        msgPush.pushMessageOperate(stadiumMsgModel);
    }

    @Override
    public void vitiationScore(TbGameEvent tbGameEvent, List<Integer> uids ) {
        if (uids == null || uids.size() == 0) {
            return;
        }
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_VITIATION_SCORE);
        String body = DateUtil.getSpecialDateStr() + MsgPush.msgUtilsReplaceFirstXXX(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName());
        StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
        Map<String, Object> params = new HashMap();
        params.put("gameEventId", (long) tbGameEvent.getId());
        params.put("gameEventType", tbGameEvent.getGameEventType());
        params.put("categoryId", tbGameEvent.getCategoryId());
        stadiumMsgModel.setParams(params);
        stadiumMsgModel.setMsgTitle(body);
        stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
        stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
        stadiumMsgModel.setMsgType(MsgType.JUMP_MSG);
        stadiumMsgModel.setIdType(IdType.STADIUM_GAME_PK_DETAIL);
        stadiumMsgModel.setToUidList(uids);
        msgPush.pushMessageOperate(stadiumMsgModel);
    }

    @Override
    public void unNormalEnd(TbGameEvent tbGameEvent, List<Integer> uids) {
        if (uids == null || uids.size() == 0) {
            return;
        }
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME__UNNORMAL_END);
        String body = DateUtil.getSpecialDateStr() + MsgPush.msgUtilsReplaceFirstXXX(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName());
        StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
        Map<String, Object> params = new HashMap();
        params.put("gameEventId", (long) tbGameEvent.getId());
        params.put("gameEventType", tbGameEvent.getGameEventType());
        params.put("categoryId", tbGameEvent.getCategoryId());
        stadiumMsgModel.setParams(params);
        stadiumMsgModel.setMsgTitle(body);
        stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
        stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
        stadiumMsgModel.setMsgType(MsgType.JUMP_MSG);
        stadiumMsgModel.setIdType(IdType.STADIUM_GAME_PK_DETAIL);
        stadiumMsgModel.setToUidList(uids);
        msgPush.pushMessageOperate(stadiumMsgModel);
    }

    @Override
    public void doubleGamePust(TbGameEvent tbGameEvent, String friendName,Integer uid) {
        if (uid == null) {
            return;
        }
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_DOUBLE_INVITE_USER);
        String body = DateUtil.getSpecialDateStr() + MsgPush.msgUtilsReplaceFirstXXX(MsgPush.msgUtilsReplaceFirstXXX(tbGameCommonParameter.getParameterValue(), friendName), tbGameEvent.getName());
        StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
        Map<String, Object> params = new HashMap();
        params.put("gameEventId", (long) tbGameEvent.getId());
        params.put("gameEventType", tbGameEvent.getGameEventType());
        params.put("categoryId", tbGameEvent.getCategoryId());
        stadiumMsgModel.setParams(params);
        stadiumMsgModel.setMsgTitle(body);
        stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
        stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
        stadiumMsgModel.setMsgType(MsgType.JUMP_MSG);
        if(tbGameEvent.getGameSystemType() == GameSystemConfigEnum.CONFIG_GAME_TYPE_PK.getId()) {
            stadiumMsgModel.setIdType(IdType.STADIUM_GAME_PK_DETAIL);
        }else{
            stadiumMsgModel.setIdType(IdType.STADIUM_GAME_EVENT_DETAIL);
        }
        List<Integer> user = Lists.newArrayList();
        user.add(uid);
        stadiumMsgModel.setToUidList(user);
        msgPush.pushMessageOperate(stadiumMsgModel);
    }

    @Override
    public void gameScoreDisagree(TbGameEvent tbGameEvent) {
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_SCORE_DISAGREE);
        String body = DateUtil.getSpecialDateStr() + MsgPush.msgUtilsReplaceXXX(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName());
        StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
        Map<String, Object> params = new HashMap();
        params.put("gameEventId", (long) tbGameEvent.getId());
        params.put("gameEventType", tbGameEvent.getGameEventType());
        params.put("categoryId", tbGameEvent.getCategoryId());
        params.put("clubId",tbGameEvent.getClubId());
        stadiumMsgModel.setParams(params);
        stadiumMsgModel.setMsgType(MsgType.JUMP_MSG);
        stadiumMsgModel.setMsgTitle(body);
        stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
        stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
        List<Integer> user = Lists.newArrayList();
        user.add(tbGameEvent.getUid());
        stadiumMsgModel.setToUidList(user);
        if(tbGameEvent.getGameSystemType() == GameSystemConfigEnum.CONFIG_GAME_TYPE_PK.getId()) {
            stadiumMsgModel.setIdType(IdType.STADIUM_GAME_PK_DETAIL);
        }else{
            stadiumMsgModel.setIdType(IdType.STADIUM_GAME_MANAGE_PAGE);
        }
        msgPush.pushMessageOperate(stadiumMsgModel);
    }

    @Override
    public void newSignUser(TbGameEvent tbGameEvent) {
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_NEW_SIGN_USER );
        String body = DateUtil.getSpecialDateStr() + MsgPush.msgUtilsReplaceXXX(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName());
        StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
        Map<String, Object> params = new HashMap();
        params.put("gameEventId", (long) tbGameEvent.getId());
        params.put("gameEventType", tbGameEvent.getGameEventType());
        params.put("categoryId", tbGameEvent.getCategoryId());
        params.put("clubId",tbGameEvent.getClubId());
        stadiumMsgModel.setParams(params);
        stadiumMsgModel.setMsgType(MsgType.JUMP_MSG);
        stadiumMsgModel.setMsgTitle(body);
        if(tbGameEvent.getGameSystemType() == GameSystemConfigEnum.CONFIG_GAME_TYPE_PK.getId()) {
            stadiumMsgModel.setIdType(IdType.STADIUM_GAME_PK_DETAIL);
        }else{
            stadiumMsgModel.setIdType(IdType.STADIUM_GAME_MANAGE_PAGE);
        }
        stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
        stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
        List<Integer> user = Lists.newArrayList();
        user.add(tbGameEvent.getUid());
        stadiumMsgModel.setToUidList(user);
        msgPush.pushMessageOperate(stadiumMsgModel);

    }

    @Override
    public void gameFinish(TbGameEvent tbGameEvent) {
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_FINISH );
        String body = DateUtil.getSpecialDateStr() + MsgPush.msgUtilsReplaceXXX(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName());
        StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
        stadiumMsgModel.setMsgTitle(body);
        stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
        stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
        stadiumMsgModel.setMsgType(MsgType.NOTIFY_MSG);
        List<Integer> user = Lists.newArrayList();
        user.add(tbGameEvent.getUid());
        stadiumMsgModel.setToUidList(user);
        msgPush.pushMessageOperate(stadiumMsgModel);

    }

    @Override
    public void gameStartBefore(TbGameEvent tbGameEvent) {
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_BEFORE_1_HOUR );
        String body = DateUtil.getSpecialDateStr() + MsgPush.msgUtilsReplaceXXX(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName());
        StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
        Map<String, Object> params = new HashMap();
        params.put("gameEventId", (long) tbGameEvent.getId());
        params.put("gameEventType", tbGameEvent.getGameEventType());
        params.put("categoryId", tbGameEvent.getCategoryId());
        params.put("clubId",tbGameEvent.getClubId());
        stadiumMsgModel.setParams(params);
        stadiumMsgModel.setMsgTitle(body);
        stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
        stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
        stadiumMsgModel.setMsgType(MsgType.JUMP_MSG);
        if(tbGameEvent.getGameSystemType() == GameSystemConfigEnum.CONFIG_GAME_TYPE_PK.getId()) {
            stadiumMsgModel.setIdType(IdType.STADIUM_GAME_PK_DETAIL);
        }else{
            stadiumMsgModel.setIdType(IdType.STADIUM_GAME_MANAGE_PAGE);
        }
        List<Integer> user = Lists.newArrayList();
        user.add(tbGameEvent.getUid());
        stadiumMsgModel.setToUidList(user);
        msgPush.pushMessageOperate(stadiumMsgModel);

    }

    @Override
    public void gameIsOff(TbGameEvent tbGameEvent) {
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_SHUT_UP );
        String body = DateUtil.getSpecialDateStr() + MsgPush.msgUtilsReplaceXXX(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName());
        StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
        stadiumMsgModel.setMsgTitle(body);
        stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
        stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
        stadiumMsgModel.setMsgType(MsgType.NOTIFY_MSG);
        List<Integer> user = Lists.newArrayList();
        user.add(tbGameEvent.getUid());
        stadiumMsgModel.setToUidList(user);
        msgPush.pushMessageOperate(stadiumMsgModel);

    }

    @Override
    public void gameNearExpire(TbGameEvent tbGameEvent) {
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_NEAR_OFF );
        String body = DateUtil.getSpecialDateStr() + MsgPush.msgUtilsReplaceXXX(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName());
        StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
        stadiumMsgModel.setMsgTitle(body);
        stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
        stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
        stadiumMsgModel.setMsgType(MsgType.NOTIFY_MSG);
        List<Integer> user = Lists.newArrayList();
        user.add(tbGameEvent.getUid());
        stadiumMsgModel.setToUidList(user);
        msgPush.pushMessageOperate(stadiumMsgModel);

    }

    @Override
    public void gameExpire(TbGameEvent tbGameEvent) {
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY,
                MsgPush.GAME_DOUBLE_INVITE_USER);
        String body = DateUtil.getSpecialDateStr() + MsgPush.msgUtilsReplaceXXX(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName());
        StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
        stadiumMsgModel.setMsgTitle(body);
        stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
        stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
        stadiumMsgModel.setMsgType(MsgType.NOTIFY_MSG);
        List<Integer> user = Lists.newArrayList();
        user.add(tbGameEvent.getUid());
        stadiumMsgModel.setToUidList(user);
        msgPush.pushMessageOperate(stadiumMsgModel);

    }

    @Override
    public void pushGameSignSuccess( List<Integer> uids,TbGameEvent tbGameEvent) {
        if (uids == null || uids.size() < 1) {
            return;
        }
        HashSet<Integer> tempSet = new HashSet<>(uids);
        uids = new ArrayList<>(tempSet);
        TbGameCommonParameter tbGameCommonParameter = baseService.queryTbGameCommonParameter(GameConstants.STADIUM_DEFAULT_GROUP_PARAMETER_KEY, MsgPush.GAME_OFFICIAL_JOIN_MSG);
        Map<String, Object> params = new HashMap();
        params.put("gameEventId", (long) tbGameEvent.getId());
        params.put("gameEventType", tbGameEvent.getGameEventType());
        params.put("categoryId", tbGameEvent.getCategoryId());
        String body = DateUtil.getSpecialDateStr() + MsgPush.msgUtilsReplaceXXX(tbGameCommonParameter.getParameterValue(), tbGameEvent.getName());
        int n = uids.size() / MAX_UID_LIST_SIZE + 1;
        for (int i = 0; i < n; i++) {
            StadiumMsgModel stadiumMsgModel = new StadiumMsgModel();
            stadiumMsgModel.setParams(params);
            stadiumMsgModel.setMsgTitle(body);
            stadiumMsgModel.setIdType(getGameDetailByType(tbGameEvent.getGameEventType().intValue()));
            stadiumMsgModel.setParams(params);
            stadiumMsgModel.setAlertTitle(configService.getProperty("pk.alert.title", "百灵鸟"));
            stadiumMsgModel.setAlertBody(configService.getProperty("pk.event.push.title", "赛事消息") + ":" + body);
            stadiumMsgModel.setMsgType(MsgType.JUMP_MSG);
            stadiumMsgModel.setToUidList(uids.subList(i * MAX_UID_LIST_SIZE, (i + 1) == n ? uids.size() : (i + 1) * MAX_UID_LIST_SIZE));
            stadiumMsgModel.setToUrl(MsgPush.USER_GAME_SCHEDULE_URL);
            msgPush.pushMessageOperate(stadiumMsgModel);
        }

    }

    /**
     * 根据赛事类型跳转详情
     *
     *
     * */
    private IdType getGameDetailByType(int gameType){
        IdType result = null;
        if(gameType == GameTypeConfigEnum.CONFIG_GAME_EVENT_TYPE_PERSONAL.getId()) {
            result = IdType.STADIUM_GAME_PK_DETAIL;
        }else if (gameType  == GameTypeConfigEnum.CONFIG_GAME_EVENT_TYPE_SCENE.getId()){
            result = IdType.STADIUM_GAME_SCENE_DETAIL;
        }else if (gameType  == GameTypeConfigEnum.CONFIG_GAME_EVENT_TYPE_INTERNAL.getId()){
            result = IdType.STADIUM_GAME_INTERNAL_DETAIL;
        }else {
            result = IdType.STADIUM_GAME_EVENT_DETAIL;
        }
        return result;
    }
}
